An Alternative Approach to Initializing Mutually Referential Objects

نویسنده

  • Don Syme
چکیده

Mutual dependencies between objects arise frequently in programs, and programmers must typically resort to manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This report describes a “base-line” proposal for a generalized form of value recursion in an ML-like language called initialization graphs, where value recursion is given the simplistic semantics of a graph of lazy computations whose nodes are sequentially forced, with uses of recursive values checked for initialization-soundness at runtime. We then develop examples using this mechanism to show how problematic the issue of value recursion is for ML-like languages, and in particular how sophisticated reactive objects cannot be defined in the language without using initialization holes, and how this forces ML programmers to break abstraction boundaries. At the same time we show how OO languages rely extensively on null pointers during initialization. We propose that a general, semi-safe mechanism allows value recursion to be used in conjunction with existing sophisicated abstract APIs such GUI libraries, and allows freshly defined APIs to be both abstract and yet not require clients to use explicit initialization holes. We propose that the initialization mechanism permits more programs to be expressed in the mutation-free fragment of ML, though we do not formally prove this result.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Initializing Mutually Referential Abstract Objects: The Value Recursion Challenge

Mutual dependencies between objects arise frequently in programs, and programmers must typically solve this value recursion by manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This paper aims to augment ongoing theoretical work on value recursion with a description of a semi-safe mechanism for a gene...

متن کامل

Obtaining referential word meanings from visual and distributional information: Experiments on object naming

We investigate object naming, which is an important sub-task of referring expression generation on real-world images. As opposed to mutually exclusive labels used in object recognition, object names are more flexible, subject to communicative preferences and semantically related to each other. Therefore, we investigate models of referential word meaning that link visual to lexical information w...

متن کامل

Perspectives and the Referential Use of De nite Descriptions in Dialogue

This is an investigation into the pragmatics of the referential use of de nite descriptions. We examine situations where a speaker uses a description to induce a hearer to pick out a certain object from a set of mutually given objects, in order to state some proposition about this object. We ask for a criterion which provides the conditions for a successful use. It depends on the belief states ...

متن کامل

A Piagetian approach to infant referential behaviors.

Near the end of the first year of life, infants begin producing referential behaviors that in adults indicate joint attention, or coordinating shared attention to an object with another person. These behaviors have been interpreted in the social cognitive literature as an indication that infants realize they are sharing attention to an object with another person. In this paper, we address theor...

متن کامل

Image Segmentation and Shape Representation Using Deformable Surfaces 1

We present a technique for constructing shape representation from images using free-form deformable surfaces. An object is modelled as a closed surface that is deformed subject to attractive fields generated by input data points and features. Segmentation is achieved by initializing the surface at some location in the scene and by letting it deforms itself until it fits the input data. Surface ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005